<template>
    <div @click="handleClick">
        {{number}}
    </div>
</template>

<script>
export default {
  props: ['count'],
  data: function () {
    return {
      number: this.count
    };
  },
  methods: {
    handleClick: function () {
      this.number = this.number + 2;
      this.$emit('countAdd', 2);
    }
  }
};
</script>
